#ifndef CONTROLLER_H
#define CONTROLLER_H

#include <windows.h>

class Controller
{
public:
	Controller();
	virtual ~Controller();

	virtual void Close();
	virtual void Command(int a_id, int a_cmd, LPARAM a_msg);
	virtual void ContextMenu(HWND a_hWnd, int a_x, int a_y);
	virtual void Create();
	virtual void Destroy();
	virtual void EraseBackground(HWND a_hWnd, HDC a_hdc);
	virtual void LButtonDown(WPARAM a_state, int a_x, int a_y);
	virtual void LButtonUp(WPARAM a_state, int a_x, int a_y);
	virtual void Notify(int a_id, LPARAM a_lParam);
	virtual void Paint(HWND a_hWnd);
	virtual void RButtonDown(WPARAM a_wParam, int a_x, int a_y);
	virtual void RButtonUp(WPARAM a_wParam, int a_x, int a_y);
	virtual void Size(int a_w, int a_h, LPARAM a_lParam);
	virtual void DrawItem(WPARAM a_wParam, LPARAM a_lParam);
	virtual void Activate(WPARAM a_wParam);
	virtual void MouseMove(WPARAM a_wParam, LPARAM a_lParam);
	virtual void KeyDown(HWND a_hWnd, WPARAM a_wParam);
	virtual void ButtonPress(HWND a_hWnd);

	//Called after all messages have been handled, can be used to reset status bar text etc
	virtual void AfterMessages();

	static LRESULT CALLBACK WndProc(HWND a_hWnd, UINT a_msg, WPARAM a_wParam, LPARAM a_lParam);

	static Controller* GetController(HWND a_hWnd);
	static void SetController(HWND a_hWnd, Controller* a_pController);
};

#endif //CONTROLLER_H